<?php 
	$i = 1;
	foreach ($menu as $menuItem):
?>
        <div class="col <?php if($i == count($menu)){?>last<?php }?>">
			<h2><a href="<?php echo $menuItem->item_value?>"><?php echo $menuItem->title?></a></h2>
			<?php if(!empty($menuItem->subs)):?>
			<ul>
				<?php foreach ($menuItem->subs as $sub):?>
                <li><a  href="<?php echo $sub->item_value?>"><?php echo $sub->title?></a></li>
                <?php endforeach;?>
			</ul>
			<?php endif;?>
        </div>
        <?php if($i != count($menu)){?>
        <div class="rule"></div>
        <?php }?>
<?php
	$i++;
	endforeach;
?>